package richbar.com.richbar.base;
import android.app.Application;
import android.content.Context;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import richbar.com.richbar.bean.LoginBean;
import richbar.com.richbar.help.Constants;
import richbar.com.richbar.util.SpUtil;

/**
 * Created by QiYang on 2018/10/16.
 */

public class BaseApplication extends Application {
    public static Context context;
    public static String uid="";
    public static boolean isLogout=false;
    public static IWXAPI iwxapi;
    public static String isSetPayPwd="";
    private LoginBean loginBean;
    @Override
    public void onCreate() {
        super.onCreate();
        context = getApplicationContext();
        iwxapi = WXAPIFactory.createWXAPI(context, Constants.APP_ID,true);
        iwxapi.registerApp(Constants.APP_ID);
        loginBean = SpUtil.getLoginInfo(this);
        if (null != loginBean)
        {
            BaseApplication.uid=loginBean.getData().getUid();
       }
    }
}
